<%@ page language="java" import="java.util.*" pageEncoding="Utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改酒店详情</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/base.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/page.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/ueditor/themes/default/ueditor.css" type="text/css"/>
<script type="text/javascript">
	window.UEDITOR_HOME_URL="${pageContext.request.contextPath}/";
	var editor;
	var editor1;
	var editor2;
</script>

<script src="${pageContext.request.contextPath}/common/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/common/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/formvalidator.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/common/js/formvalidatorregex.js"></script>
<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/editor_config.js"></script>
<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/editor_all.js"></script>

<script type="text/javascript">
	$(function(){
		$.formValidator.initConfig({formid:"editform",autotip:true});
		$("#name").formValidator({onshow:"请输入酒店名称",onfocus:"酒店名称不能为空。"}).inputValidator({min:1,max:30,onerror:"酒店名称不能多于30位。"});
		
	});

function submit1()
{

	$("#introduction").val(editor.getContent());
	$("#orderNote").val(editor1.getContent());
	$("#traffic").val(editor2.getContent());
	$("#editform").submit();
}

</script>
</head>
<body>
<form id="editform" action="hotelInfo!update.action" method="post">
<input type="hidden" id="url" name="url"/>
<div id="main_frame">	
	<div id="pagemenu"><a href="javascript:void();" class="selected">基本信息</a></div>
	<input type="hidden" name="hotelInfo.id" value="${hotelInfo.id}"/>
	<div class="listtitle">
		<ul>
			<li class="selected"><a href="javascript:void(0);" title="基本信息">基本信息</a></li>
		</ul>
	</div>
	<div class="listbox">
			<div>	
			<table class="addtab"  align="center">
					<tr>
						<th>酒店名称</th>
						<td><input type="text" class="tx1" name="hotelInfo.name" title="请输入用户名" value="<s:property value="hotelInfo.name"/>" id="name"/></td>
					</tr>


					<tr>
						<th>酒店地址</th>
						<td>
							<input name="hotelInfo.address" class="tx5" value="${hotelInfo.address}" id="address"/>	
						</td>
					</tr>
				<tr>
						<th>联系方式</th>
						<td><input name="hotelInfo.tel" class="tx4" value="${hotelInfo.tel}" id="tel"/></td>
					</tr>	
					<tr>
						<th>酒店简介</th>
						<td><textarea id="summary" class="tex2" name="hotelInfo.summary">${hotelInfo.summary}</textarea></td>
					</tr>	
					
					<tr>
						<th>酒店详情</th>
						<td valign="top">
						<input type="hidden" class="tx6" id="introduction" name="hotelInfo.introduction"/>
						<script type="text/plain" id="myEditor" style="width:98%">
   						</script>
					    <script type="text/javascript">
					        // 自定义的编辑器配置项,此处定义的配置项将覆盖editor_config.js中的同名配置
					        editor = new baidu.editor.ui.Editor();
					        editor.render( 'myEditor' );
					        editor.ready(function(){editor.setContent('${hotelInfo.introduction}');});
					    </script>
					    <div id="contenteditoer_img"></div>
						</td>
					</tr>
					
					<tr>
						<th>预定须知</th>
						<td valign="top">
						<input type="hidden" class="tx6" id="orderNote" name="hotelInfo.orderNote"/>
						<script type="text/plain" id="myEditor1" style="width:98%">
   						</script>
					    <script type="text/javascript">
					        // 自定义的编辑器配置项,此处定义的配置项将覆盖editor_config.js中的同名配置
					        editor1 = new baidu.editor.ui.Editor();
					        editor1.render( 'myEditor1' );
					        editor1.ready(function(){editor1.setContent('${hotelInfo.orderNote}');});
					    </script>
					    <div id="contenteditoer_img"></div>
						</td>
					</tr>
					<tr>
						<th>交通地图</th>
						<td valign="top">
						<input type="hidden" class="tx6" id="traffic" name="hotelInfo.traffic"/>
						<script type="text/plain" id="myEditor2" style="width:98%">
   						</script>
					    <script type="text/javascript">
					        // 自定义的编辑器配置项,此处定义的配置项将覆盖editor_config.js中的同名配置
					        editor2 = new baidu.editor.ui.Editor();
					        editor2.render( 'myEditor2' );
					        editor2.ready(function(){editor2.setContent('${hotelInfo.traffic}');});
					   </script>
					    <div id="contenteditoer_img"></div>
						</td>
					</tr>					
		
			</table>
		             </div>
			</div>
			</div>
		</form>
<div id="bottombar">
	<div class="fr btns"><input onclick="submit1();" type="button" value="保存" class="savebtn1"/><input type="button" value="取消 " class="cancelbtn" onclick="history.go(-1)"/></div>
</div>
</body>
</html>